# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=typst-lsp
pkgver=0.13.0
pkgrel=0
pkgdesc="Language server for typst"
url="https://github.com/nvarner/typst-lsp"
# typst, rust-analyzer
arch="aarch64 ppc64le x86_64"
license="MIT"
depends="rust-analyzer"
makedepends="
	cargo
	cargo-auditable
	openssl-dev
	"
source="
	https://github.com/nvarner/typst-lsp/archive/refs/tags/v$pkgver/typst-lsp-$pkgver.tar.gz
	"
options="net !check" # no tests

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build \
		--release \
		--frozen \
		--no-default-features \
		--features=remote-packages,native-tls
}

package() {
	install -Dm755 target/release/typst-lsp -t "$pkgdir"/usr/bin/
}

sha512sums="
1287257320ab502d806d8df3d819ddfe803f98c96dfc9c9e50b7a1cd905527638bb8025107d828d54f846875b82d02e2862dc8a5da0e915009edb8ed133ba3f1  typst-lsp-0.13.0.tar.gz
"
